package com.xy.common.util;

import java.util.List;

import org.springframework.beans.factory.InitializingBean;

import com.xy.core.model.Tdictionarytype;
import com.xy.core.model.Tdictionay;
import com.xy.core.service.TdictionarytypeService;
import com.xy.core.service.TdictionayService;
import com.xy.core.util.SpringBeanUtils;
import com.xy.gateway.model.EpayGateSetting;
public class InitDictData implements InitializingBean {
	@Override
	public void afterPropertiesSet() throws Exception {
		List<Tdictionay> l= ((TdictionayService)SpringBeanUtils.getBean("tdictionayService")).getAll();
		DictUtils.init(l);
		List<Tdictionarytype> l1 = ((TdictionarytypeService) SpringBeanUtils
				.getBean("tdictionarytypeService"))
				.getAll();
		DictUtils.addDictType(l1);
		
 
		//
		
		EpayGateSetting e=(EpayGateSetting)SpringBeanUtils.getBean("epayGateSetting");
		e.reload();
	}
}
